FROM centos
MAINTAINER ye

ENV MYPATH /usr/local
WORKDIR $MYPATH

#安装vim
RUN yum -y install vim
#安装ifconfi
RUN yum -y install net-tools
#安装java8及lib
RUN yum -y install glib.i686
RUN mkdir /usr/local/java
#add 是相对路径jar 把tar包添加到容器中，安装包必须要和dockerfile文件在同一位置
ADD jdk- /usr/local/java/
#配置Java环境变量
ENV JAVA_HOME /usr/local/java/jdk
ENV JRE_HOME $JRE_HOME/jre
ENV CLASSPATH $JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib:$CLASSPATH
ENV PATH &JAVA_HOME/bin:$PATH

EXPOSE 80
CMD echo $MYPATH
CMD echo "success-------ok"
CMD /bin/bash